package com.serv.model.activiti.mapper;

import com.serv.model.activiti.ActProcdefInfo;
import com.serv.model.activiti.ActProcdefInfoCriteria;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ActProcdefInfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @SelectProvider(type=ActProcdefInfoSqlProvider.class, method="countByExample")
    long countByExample(ActProcdefInfoCriteria example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @DeleteProvider(type=ActProcdefInfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(ActProcdefInfoCriteria example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @Delete({
        "delete from ACT_PROCDEF_INFO",
        "where ID_ = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @Insert({
        "insert into ACT_PROCDEF_INFO (ID_, PROC_DEF_ID_, ",
        "REV_, INFO_JSON_ID_)",
        "values (#{id,jdbcType=VARCHAR}, #{procDefId,jdbcType=VARCHAR}, ",
        "#{rev,jdbcType=INTEGER}, #{infoJsonId,jdbcType=VARCHAR})"
    })
    int insert(ActProcdefInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @InsertProvider(type=ActProcdefInfoSqlProvider.class, method="insertSelective")
    int insertSelective(ActProcdefInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @SelectProvider(type=ActProcdefInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID_", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="PROC_DEF_ID_", property="procDefId", jdbcType=JdbcType.VARCHAR),
        @Result(column="REV_", property="rev", jdbcType=JdbcType.INTEGER),
        @Result(column="INFO_JSON_ID_", property="infoJsonId", jdbcType=JdbcType.VARCHAR)
    })
    List<ActProcdefInfo> selectByExample(ActProcdefInfoCriteria example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "ID_, PROC_DEF_ID_, REV_, INFO_JSON_ID_",
        "from ACT_PROCDEF_INFO",
        "where ID_ = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="ID_", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="PROC_DEF_ID_", property="procDefId", jdbcType=JdbcType.VARCHAR),
        @Result(column="REV_", property="rev", jdbcType=JdbcType.INTEGER),
        @Result(column="INFO_JSON_ID_", property="infoJsonId", jdbcType=JdbcType.VARCHAR)
    })
    ActProcdefInfo selectByPrimaryKey(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @UpdateProvider(type=ActProcdefInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ActProcdefInfo record, @Param("example") ActProcdefInfoCriteria example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @UpdateProvider(type=ActProcdefInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") ActProcdefInfo record, @Param("example") ActProcdefInfoCriteria example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @UpdateProvider(type=ActProcdefInfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ActProcdefInfo record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table ACT_PROCDEF_INFO
     *
     * @mbg.generated
     */
    @Update({
        "update ACT_PROCDEF_INFO",
        "set PROC_DEF_ID_ = #{procDefId,jdbcType=VARCHAR},",
          "REV_ = #{rev,jdbcType=INTEGER},",
          "INFO_JSON_ID_ = #{infoJsonId,jdbcType=VARCHAR}",
        "where ID_ = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(ActProcdefInfo record);
}